CREATE TABLE [dbo].[TCRENO_PROV]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[CO_PROV] [dbo].[TD_VC_020] NOT NULL,
[NU_RENO] [dbo].[TD_VC_008] NOT NULL,
[FE_RENO] [dbo].[TD_DT_001] NOT NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NOT NULL,
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[FA_TIPO_CAMB] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TCRENO_PR__FA_TI__7AF13DF7] DEFAULT ((1.000)),
[ST_CONT] [dbo].[TD_VC_001] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TCRENO_PR__NU_PR__7BE56230] DEFAULT ((0)),
[CO_COND_PAGO] [dbo].[TD_VC_003] NULL,
[FE_INIC_VMTO] [dbo].[TD_DT_001] NULL,
[NU_LETR_GENE] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TCRENO_PR__NU_LE__7CD98669] DEFAULT ((0)),
[ST_PLAZ_VMTO] [dbo].[TD_VC_001] NULL,
[NU_DIAS_PLAZ] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TCRENO_PR__NU_DI__7DCDAAA2] DEFAULT ((0)),
[NU_DIFE_DIAS] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TCRENO_PR__NU_DI__7EC1CEDB] DEFAULT ((0)),
[ST_FECH_VMTO] [dbo].[TD_VC_001] NULL,
[TI_SITU] [dbo].[TD_VC_003] NOT NULL,
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[NU_DIAS_MESE] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TCRENO_PR__NU_DI__7FB5F314] DEFAULT ((0)),
[ST_DIAS_FMES] [dbo].[TD_VC_001] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCRENO_PR__CO_US__00AA174D] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCRENO_PR__FE_US__019E3B86] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCRENO_PR__CO_US__02925FBF] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCRENO_PR__FE_US__038683F8] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCRENO_PROV] ADD CONSTRAINT [PK__TCRENO_P__15EA20235110DE1B] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [CO_PROV], [NU_RENO], [FE_RENO]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCRENO_PROV] ADD CONSTRAINT [FK__TCRENO_PR__CO_EM__1D472152] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
ALTER TABLE [dbo].[TCRENO_PROV] ADD CONSTRAINT [FK__TCRENO_PROV__1C52FD19] FOREIGN KEY ([CO_EMPR], [CO_TIPO_OPER]) REFERENCES [dbo].[TTTIPO_OPER] ([CO_EMPR], [CO_TIPO_OPER])
GO
